<% layout("/WEB-INF/view/console/skins/skin_2/layout_nonav.html", {}) {
 %>
 <h2 class="header-text"  style="padding-top: 60px;">
						个人设置
						<span class="sub-header">
							修改密码
						</span>
					</h2>
 <div class="row">
 <div class="col-md-12 column">
			<div class="row clearfix">
				<div class="col-md-3 column">
			</div>
				<div class="col-md-1 column">
				<ul class="nav nav-pills nav-stacked nav-pills-stacked-example">
    			  <li role="presentation" ><a href="${ctxPath}/console/sys_user/base">个人信息</a></li>
     				<!--  <li role="presentation"><a href="${ctxPath}/console/dev_company/authentication">认证信息</a></li> -->
      				<li role="presentation" class="active"><a href="#">修改密码</a></li>
   					 </ul>
				</div>
	 	<div class="col-md-6 column">
	 	<form role="form" id="form" class="form-horizontal">
                
                    <div class="form-group clearfix">
                        <label class="col-xs-2 text-right">原始密码</label>
                        <div class="col-sm-10">
                       	<input class="form-control" type="password" id="old_password"  value="" >
                        </div>
                    </div>
                     <div class="form-group clearfix">
                        <label class="col-xs-2 text-right">新密码</label>
                        <div class="col-sm-10">
                       	<input class="form-control" type="password" id="new_password1"  value="" >
                        </div>
                    </div>
                      <div class="form-group clearfix">
                        <label class="col-xs-2 text-right">确认密码</label>
                        <div class="col-sm-10">
                       	<input class="form-control" type="password" value=""  id="new_password">
                        </div>
                    </div>
                        <div class="form-group clearfix">
                         <div class="col-sm-2">
                         </div>
                        <div class="col-sm-10">
                      		<input class="btn btn-success btn-sm" type="button" value="确认" id="save">
                        </div>
                    </div>
                </form>
                
		</div>
	 </div>
	 </div>
	<script type="text/javascript">
	$(function($){
	    $("#save").click(function(){
		var v=false;
		var old_password=$("#old_password").val();
		var new_password=$("#new_password").val();
		var new_password1=$("#new_password1").val();
		var m="";
		if(old_password==""){
		    v=false;
		    m="原始密码不能为空";
		}else  if(new_password==""){
		    v=false;
		    m="新密码不能为空";
		}else if(new_password!=new_password1){
		    v=false;
		    m="新密码与确认密码不一致";
		}else{
		    v=true;
		}
		 if (!v) {
		     alert(m);
		 	return false;  
		 }else{
		     $.post("${ctxPath}/console/sys_user/dochangepass",{new_password:$("#new_password").val(),old_password:$("#old_password").val()},function(data){
                 $.alert({
                     title:"提示",
                     content: data.message
                 });
		     });
		 }
	    });
	});
	</script>
 </div>
 
 <%} %>
 